package com.grj.parking.drools.config;

public enum ResultCode {
    SUCCESS(200, "成功"),
    FAIL(500, "失败"),
    NOT_FOUND(404, "未找到"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    NOT_SUPPORTED(415, "不支持的媒体类型"),
    NOT_ACCEPTABLE(406, "不支持的请求"),
    METHOD_NOT_ALLOWED(405, "不允许的方法"),
    REQUEST_TIMEOUT(408, "请求超时"),
    REQUEST_ENTITY_TOO_LARGE(413, "请求实体过大"),
    REQUEST_URI_TOO_LONG(414, "请求URI过长"),
    UNSUPPORTED_MEDIA_TYPE(415, "不支持的媒体类型"),
    TOO_MANY_REQUESTS(429, "请求过多"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误"),
    NOT_IMPLEMENTED(501, "功能未实现"),
    SERVICE_UNAVAILABLE(503, "服务不可用"),
    GATEWAY_TIMEOUT(504, "网关超时"),
    HTTP_VERSION_NOT_SUPPORTED(505, "HTTP版本不受支持"),
    UNKNOWN_ERROR(999, "未知错误"),
    PARKING_LOT_NOT_AVAILABLE(1001, "停车场不存在或已满"),
    NO_AVAILABLE_SPACE(1002, "无可用车位"),
    INVALID_LICENSE_PLATE(1003, "无效的车牌号"),
    RECORD_NOT_FOUND(1004, "记录不存在"),
    ALREADY_PAID(1005, "已支付"),
    FEE_NOT_CALCULATED(1006, "停车费用未计算"),
    INVALID_PAYMENT_METHOD(1007, "无效的支付方式"),
    ORDER_NOT_FOUND(1008, "未知订单"),
    PAYMENT_NOT_FOUND(1009, "支付订单不存在"),
    VEHICLE_ALREADY_ENTERED(1010, "车辆已入场" );
    private final int code;
    private final String msg;
    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public int getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
}
